import librosa.display

class SpectrogramGenerator:
    def create_mel_spectrogram(self, y, sr=44100):
        """生成梅尔频谱"""
        return librosa.feature.melspectrogram(y=y, sr=sr)